package cn.northsea.service.impl;


import cn.northsea.mapper.DeptMapper;
import cn.northsea.pojo.Dept;
import cn.northsea.pojo.User;
import cn.northsea.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<Dept> findAll() {
        return deptMapper.findAll();
    }

    @Override
    public User findUserById(Integer userId) {
        return deptMapper.findUserById(userId);
    }

    @Override
    public void allocationDept(Integer userId, Integer deptId) {
        deptMapper.allocationDept(userId, deptId);
    }
}
